package com.kuang.controller;

import com.kuang.bean.Admin;
import com.kuang.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/Background")
public class AdminController {
    @Autowired
    private AdminService adminService;

    //后台大厅页面
    @RequestMapping("/BgHome")
    public String BackgroundHome(String adminname, String password, Model model){
        System.out.println(adminname+password);
        //管理员验证账号密码
        //根据账号查询密码验证
        return "BgHome";
//        List<Admin> admin = adminService.qureyAdminByName(adminname);
//        String Table_password = admin.get(0).getPassword();
//        if(password.equals(Table_password)){
////            model.addAttribute();
//            return "BgHome";
//        }
//        System.out.println(admin.get(1).getPassword()+admin.get(1).getSex()+admin.get(1).getCreateTime());
//        return "indexfalse";


    }

    public String Redict(String str){
        return str;
    }
}
